﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CheccCoverplateCulvertAssemble.Common.Total
{
    /// <summary>
    /// 端墙
    /// </summary>
    public class CommonEndWall : MyNotifyPropertyChanged
    {
        private EndWallBase _endWallLeft = new EndWallBase();
        private EndWallBase _endWallRight = new EndWallBase();

        public CommonEndWall()
        {
        }

        public CommonEndWall(EndWallBase endWallLeft, EndWallBase endWallRight)
        {
            this.EndWallLeft = endWallLeft;
            this.EndWallRight = endWallRight;
        }

        /// <summary>
        /// 左侧参数
        /// </summary>
        public EndWallBase EndWallLeft
        {
            get
            {
                return _endWallLeft;
            }
            set
            {
                if (value == _endWallLeft)
                    return;
                _endWallLeft = value;
                NotifyPropertyChanged(() => EndWallLeft);
            }
        }
        /// <summary>
        /// 右侧参数
        /// </summary>
        public EndWallBase EndWallRight
        {
            get
            {
                return _endWallRight;
            }
            set
            {
                if (value == _endWallRight)
                    return;
                _endWallRight = value;
                NotifyPropertyChanged(() => EndWallRight);
            }
        }
    }

    public class EndWallBase : MyNotifyPropertyChanged
    {
        private double _slope;
        private double _baseBurialDepth;
        private double _height;
        private double _baseNumberOfPlies;
        private double _baseHeight;
        private double _width;
        private double _overhang;
        private double _edgeIn;
        private double _edgeOut;
        private string _material;

        public EndWallBase()
        {
        }

        public EndWallBase(double slope, double baseBurialDepth, double height, double baseNumberOfPlies, double baseHeight, double width, double overhang, double edgeIn, double edgeOut, string material)
        {
            Slope = slope;
            BaseBurialDepth = baseBurialDepth;
            Height = height;
            BaseNumberOfPlies = baseNumberOfPlies;
            BaseHeight = baseHeight;
            Width = width;
            Overhang = overhang;
            EdgeIn = edgeIn;
            EdgeOut = edgeOut;
            Material = material;
        }

        /// <summary>
        /// 墙背坡度
        /// </summary>
        public double Slope
        {
            get
            {
                return _slope;
            }
            set
            {
                if (value == _slope)
                    return;
                _slope = value;
                NotifyPropertyChanged(() => Slope);
            }
        }

        /// <summary>
        /// 基础埋深
        /// </summary>
        public double BaseBurialDepth
        {
            get
            {
                return _baseBurialDepth;
            }
            set
            {
                if (value == _baseBurialDepth)
                    return;
                _baseBurialDepth = value;
                NotifyPropertyChanged(() => BaseBurialDepth);
            }
        }

        /// <summary>
        /// 涵顶以上墙高
        /// </summary>
        public double Height
        {
            get
            {
                return _height;
            }
            set
            {
                if (value == _height)
                    return;
                _height = value;
                NotifyPropertyChanged(() => Height);
            }
        }

        /// <summary>
        /// 基础层数
        /// </summary>
        public double BaseNumberOfPlies
        {
            get
            {
                return _baseNumberOfPlies;
            }
            set
            {
                if (value == _baseNumberOfPlies)
                    return;
                _baseNumberOfPlies = value;
                NotifyPropertyChanged(() => BaseNumberOfPlies);
            }
        }

        /// <summary>
        /// 基础高度
        /// </summary>
        public double BaseHeight
        {
            get
            {
                return _baseHeight;
            }
            set
            {
                if (value == _baseHeight)
                    return;
                _baseHeight = value;
                NotifyPropertyChanged(() => BaseHeight);
            }
        }

        /// <summary>
        /// 墙顶宽度
        /// </summary>
        public double Width
        {
            get
            {
                return _width;
            }
            set
            {
                if (value == _width)
                    return;
                _width = value;
                NotifyPropertyChanged(() => Width);
            }
        }

        /// <summary>
        /// 墙体外悬值
        /// </summary>
        public double Overhang
        {
            get
            {
                return _overhang;
            }
            set
            {
                if (value == _overhang)
                    return;
                _overhang = value;
                NotifyPropertyChanged(() => Overhang);
            }
        }

        /// <summary>
        /// 内侧基础襟边
        /// </summary>
        public double EdgeIn
        {
            get
            {
                return _edgeIn;
            }
            set
            {
                if (value == _edgeIn)
                    return;
                _edgeIn = value;
                NotifyPropertyChanged(() => EdgeIn);
            }
        }

        /// <summary>
        /// 外侧基础襟边
        /// </summary>
        public double EdgeOut
        {
            get
            {
                return _edgeOut;
            }
            set
            {
                if (value == _edgeOut)
                    return;
                _edgeOut = value;
                NotifyPropertyChanged(() => EdgeOut);
            }
        }

        /// <summary>
        /// 一字墙材料
        /// </summary>
        public string Material
        {
            get
            {
                return _material;
            }
            set
            {
                if (value == _material)
                    return;
                _material = value;
                NotifyPropertyChanged(() => Material);
            }
        }
    }
}
